<?php 

class Add_Publish_Article_ShowForm_Tags
{
    public $url;
    public $name;
    public $checked;
    
    public function __construct($tagId)
    {
        $this->_build($tagId);
    }
    
    private function _build($tagId)
    {
        $_tagRow = App_Model_DbTable_Tags::getInstance()->getRowById($tagId);
        if(!$_tagRow){
            return "";
        }
        
        $this->url  = Ext_Url::getInstance()->tag($tagId)->articleList;
        $this->name = $_tagRow['tagName'];
    }
    
    public function setChecked()
    {
        $this->checked = "checked";
    }
}